package com.jk.controller;

import com.jk.dto.TemInterview;
import com.jk.pojo.ResponseResult;
import com.jk.service.TemInterviewServiceFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yzf
 * @version 1.0
 * @ClassName TemInterviewController
 * @program: office
 * @description: TODO
 * @date 2025/2/17 20:33
 */
@Slf4j
@Api(tags = "面试管理模块")
@RestController
@RequestMapping("/interview")
public class TemInterviewController {
    @Autowired
    private TemInterviewServiceFeign temInterviewServiceFeign;

    @ApiOperation(value = "添加面试信息",httpMethod = "POST",notes = "添加面试信息")
    @RequestMapping("/addInterview")
    public ResponseResult addInterview (@RequestBody TemInterview temInterview){
        try {
            temInterviewServiceFeign.addInterview(temInterview);
            return new ResponseResult(200,"添加面试信息成功");
        } catch (Exception e) {
            e.printStackTrace();
            return new ResponseResult(500,"添加面试信息失败");

        }
    }
}
